﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace mBlog.Data.Entities
{
    public class Tag
    {
        public long Id { get; set; }

        [Column(TypeName = "nvarchar")]
        [Required]
        [StringLength(250)]
        public string Name { get; set; }

        [Column(TypeName = "varchar")]
        [StringLength(250)]
        public string UrlName { get; set; }

        public DateTime AddedTime { get; set; }
        public bool IsActive { get; set; }

        public virtual ICollection<Post> Posts { get; set; }
    }
}